#include "osgi-predefined.h"

#define SID_EnAndDeCryption  "SID_EnAndDeCryption"
#define IID_EnAndDeCryption  "IID_EnAndDeCryption"

#define  Cryption_DLL __attribute__((visibility("default")))

OSGI_NAMESPACE_BEGIN

OSGI_INTERFACE ICryptionResponse
{
    virtual int MKRAPI GetData(void **ppBuf);

    virtual int MKRAPI GetLenth();

    virtual int MKRAPI Destroy() = 0;
};

OSGI_INTERFACE ICryption : public IService
{
    virtual int MKRAPI Destroy() = 0;
};

OSGI_INTERFACE ICryptionFactory : public IService
{
    //对称加密
    virtual ICryption* CreateSymCryption();

    //非对称加密
    virtual ICryption* CreateAsymCryption();

    //摘要加密
    virtual ICryption* CreateDigestCryption();

    //签名加密
    virtual ICryption* CreateSignCryption();

    //验证加密
    virtual ICryption* CreateVerifyCryption();

};

OSGI_INTERFACE ISymCryption : public ICryption
{
    virtual int EnCryption(void** ppData, void** ppKey, ICryptionResponse* res);

    virtual int DeCryption(void** ppData, void** ppKey, ICryptionResponse* res);
};

OSGI_INTERFACE IAsymCryption : public ICryption
{

};


OSGI_INTERFACE IDigestCryption : public ICryption
{

};


OSGI_INTERFACE ISignCryption : public ICryption
{

};


OSGI_INTERFACE IVerifyCryption : public ICryption
{

};




OSGI_NAMESPACE_END
